<template>
  <div> 
    <el-tabs v-model="mediaType" type="card" @tab-click="handleTabClick">
      <el-tab-pane label="微信" name="wechat"></el-tab-pane>
      <el-tab-pane label="短信" name="sms"></el-tab-pane>
      <el-tab-pane label="邮件" name="mail"></el-tab-pane>
      <el-tab-pane label="微页面" name="wepage"></el-tab-pane>
      <el-tab-pane label="海报" name="poster"></el-tab-pane>
    </el-tabs>
    <wechat-check v-if="mediaType=='wechat'"></wechat-check>
    <weibo-check v-else-if="mediaType=='weibo'"></weibo-check>
    <sms-check v-else-if="mediaType=='sms'"></sms-check>
    <mail-check v-else-if="mediaType=='mail'"></mail-check>
    <wepage-check v-else-if="mediaType=='wepage'"></wepage-check>
    <poster-check v-else="mediaType=='poster'"></poster-check>
  </div>
</template>
<script>
  import wechatCheck from './wechat'
  import weiboCheck from './weibo'
  import smsCheck from './sms'
  import mailCheck from './mail'
  import wepageCheck from './wepage'
  import posterCheck from './poster'
  export default {
    components: {wechatCheck, weiboCheck, smsCheck, mailCheck, wepageCheck, posterCheck},
    data () {
      return {
        mediaType: this.$route.params.mediaType
      }
    },
    methods: {
      handleTabClick () {
        this.$router.push({name: 'ReleaseChecked', params: {mediaType: this.mediaType}})
      }
    }
  }
</script>
<style lang="scss">
  .el-tooltip__popper{
    max-width: 200px;
    word-break: break-all;
    word-wrap: break-word;
  }
</style>
